<!--
 * @FilePath     : /study_code/layui/13-2-12.html
 * @Description  : limits 自定义每页分页数
 * @Date         : 2025-04-07 17:14:25
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-08 14:32:07
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <table id="demo" lay-filter="test"></table>

    <script src="/layui/dist/layui.js"></script>
    <script src="/layui/table/common.js"></script>
    <script>
      var table = layui.table

      table.render({
        elem: '#demo',
        cols: cols,
        data: tableData,

        page: true,
        limit: 15,
        /**
         * @key: limits
         * @brief: 设置每页可设置条数的选项
         * @value {Array} 数组格式，元素数值为可选的每页对应的项数；
         *    [10, 20, 30, 40, 50, 60, 70, 80, 90] (def)默认是 10, 20, ..., 90 的数组
         */
        // limits: [10, 20, 30, 40, 50, 60, 70, 80, 90],
        // limits: [30, 60, 90],
        limits: [5, 10, 15, 20],
      })
    </script>
  </body>
</html>